//
//  LKVisitorTableViewController.swift
//  LKweibo
//
//  Created by mac on 16/4/4.
//  Copyright © 2016年 什么人玩什么鸟. All rights reserved.
//

import UIKit

class LKVisitorTableViewController: UITableViewController {

    //用户登录状态
    private var userLogin = false
    
    //加载视图,这句????~~~~~~~~~~~~~~~
    var visitorView: LKVisitorView?
    
    override func loadView() {
        
        userLogin ? super.loadView() : loadVisitorView()
    }
    
    override func viewDidAppear(animated: Bool) {
        super.viewDidAppear(animated)
        print(visitorView)
    }
}

extension LKVisitorTableViewController{
    private func loadVisitorView(){
        
        visitorView = LKVisitorView()
        //将当前view 替换成自定义view
        view = visitorView
    }
}
